
<!-- m_navbar-->
{{template "m_navbar.html" .}}


<!-- body start-->
<div class="panel panel-default">
    <!-- Default panel contents -->
    <div class="alert alert-light" role="alert">
        <p>用户列表: 总人数（{{.count}}）</p>
        {{if eq 5 $.role}}{{/*管理员操作*/}}
        <div>
            <a class="btn btn-outline-primary" role="button" href="/register?active=4">添加用户</a>
        </div>
        {{end}}
    </div>

    <!-- Table -->
    <table class="table">
        <tr>
            <th>编号</th>
            <th>用户名</th>
            <th>账户</th>
            <th>时间</th>
            <th>操作</th>
        </tr>
        <!--.files  读取分离文件列表-->
        {{range $index, $elem := .users}}
            {{if lt 1 $elem.ID}}
            <tr>
                <th>#{{$index}}</th>{{/*编号*/}}
                <th>{{$elem.Name}}</th>{{/*名称*/}}
                <th>{{$elem.Account}}</th>{{/*账户*/}}
                <th>{{$elem.UpdateAt}}</th>{{/*时间*/}}
                <th>
                    <a class="btn btn-outline-dark" href="/sfadduf?uid={{$elem.ID}}&&active={{$.active}}">分享文件</a>
                    {{if eq 5 $.role}}{{/*管理员操作*/}}
                        <a class="btn btn-outline-dark" href="/uupdate?uid={{$elem.ID}}&&active={{$.active}}">修改</a>
                        <a class="btn btn-outline-dark" href="/udelete?uid={{$elem.ID}}&&active{{$.active}}">删除</a>
                    {{end}}
                </th>
            </tr>
            {{end}}
        {{end}}

    </table>
</div>

<!-- body end-->

<!-- m_footer-->
{{template "m_footer.html" .}}